const orderService = require('../../../services/orderService');
const { successRes, errorRes } = require('../../../utils/responseHandler');

// 获取订单列表
const getOrderList = async (req, res) => {
    try {
        const params = req.query;
        const orders = await orderService.getAllOrders(params);
        successRes(res, orders);
    } catch (err) {
        errorRes(res, err.message);
    }
};
module.exports = { getOrderList };